<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EasyXPlus: easyBitmap.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EasyXPlus
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">EasyXPlus is a simple graphic library for C++ BEGINNERS under Windows.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">easyBitmap.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef EASY_BITMAP_H</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define EASY_BITMAP_H</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;easyGeometry.h&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_easy_x_plus.html">EasyXPlus</a></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;{</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_easy_x_plus_1_1_bitmap.html">   20</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_easy_x_plus_1_1_bitmap.html">Bitmap</a></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    {</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;        <span class="keyword">explicit</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a730d52870cea87f48d7aa79bbcc24183">Bitmap</a>(std::wstring bitmapFilename);</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;        ~<a class="code" href="class_easy_x_plus_1_1_bitmap.html">Bitmap</a>();</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordtype">unsigned</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a366ec6d09e3846f7e84dd8672e8f8613">getWidth</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        <span class="keywordtype">unsigned</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a79b977d19be38c69e101cfc30c3cbf9e">getHeight</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#ad1bb3d00559fe1de361990fa923d6a7a">verticalFlip</a>();</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a6fc65a423a60bd4357b5c893e68fcbcf">horizontalFlip</a>();</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#ae42b35c824cad539e8e44d4d0b317e75">resetFlip</a>();</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a42573564363fe8b621210c18d9a1d0b4">draw</a>(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect_region.html">RectRegion</a>&amp; region);</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a42573564363fe8b621210c18d9a1d0b4">draw</a>(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_point.html">Point</a>&amp; leftTop, <span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_rect.html">Rect</a>&amp; rect);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_easy_x_plus_1_1_bitmap.html#a42573564363fe8b621210c18d9a1d0b4">draw</a>(<span class="keyword">const</span> <a class="code" href="class_easy_x_plus_1_1_point.html">Point</a>&amp; leftTop, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordtype">void</span> draw_(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        HBITMAP bitmapHandle;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        BITMAP bitmapStruct;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        HDC memoryDC;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;        <span class="keywordtype">bool</span> isVerticalFlip;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <span class="keywordtype">bool</span> isHorizontalFlip;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    };</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;}</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_a366ec6d09e3846f7e84dd8672e8f8613"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#a366ec6d09e3846f7e84dd8672e8f8613">EasyXPlus::Bitmap::getWidth</a></div><div class="ttdeci">unsigned getWidth() const</div><div class="ttdoc">Get bitmap width in pixel unit. </div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_ae42b35c824cad539e8e44d4d0b317e75"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#ae42b35c824cad539e8e44d4d0b317e75">EasyXPlus::Bitmap::resetFlip</a></div><div class="ttdeci">void resetFlip()</div><div class="ttdoc">Reset(clear) all flip actions. </div></div>
<div class="ttc" id="class_easy_x_plus_1_1_rect_html"><div class="ttname"><a href="class_easy_x_plus_1_1_rect.html">EasyXPlus::Rect</a></div><div class="ttdoc">A class represents rectangle. </div><div class="ttdef"><b>Definition:</b> easyGeometry.h:82</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_a79b977d19be38c69e101cfc30c3cbf9e"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#a79b977d19be38c69e101cfc30c3cbf9e">EasyXPlus::Bitmap::getHeight</a></div><div class="ttdeci">unsigned getHeight() const</div><div class="ttdoc">Get bitmap height in pixel unit. </div></div>
<div class="ttc" id="class_easy_x_plus_1_1_rect_region_html"><div class="ttname"><a href="class_easy_x_plus_1_1_rect_region.html">EasyXPlus::RectRegion</a></div><div class="ttdoc">A class represents a rectangle area. </div><div class="ttdef"><b>Definition:</b> easyGeometry.h:55</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_ad1bb3d00559fe1de361990fa923d6a7a"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#ad1bb3d00559fe1de361990fa923d6a7a">EasyXPlus::Bitmap::verticalFlip</a></div><div class="ttdeci">void verticalFlip()</div><div class="ttdoc">Flip the bitmap vertically. </div></div>
<div class="ttc" id="class_easy_x_plus_1_1_point_html"><div class="ttname"><a href="class_easy_x_plus_1_1_point.html">EasyXPlus::Point</a></div><div class="ttdoc">A point class. </div><div class="ttdef"><b>Definition:</b> easyGeometry.h:19</div></div>
<div class="ttc" id="namespace_easy_x_plus_html"><div class="ttname"><a href="namespace_easy_x_plus.html">EasyXPlus</a></div><div class="ttdef"><b>Definition:</b> easyBitmap.h:15</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_a730d52870cea87f48d7aa79bbcc24183"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#a730d52870cea87f48d7aa79bbcc24183">EasyXPlus::Bitmap::Bitmap</a></div><div class="ttdeci">Bitmap(std::wstring bitmapFilename)</div><div class="ttdoc">Creates a bitmap from the given filename. </div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_a42573564363fe8b621210c18d9a1d0b4"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#a42573564363fe8b621210c18d9a1d0b4">EasyXPlus::Bitmap::draw</a></div><div class="ttdeci">void draw(const RectRegion &amp;region)</div><div class="ttdoc">Draw the bitmap in the given region. </div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html">EasyXPlus::Bitmap</a></div><div class="ttdoc">A bitmap class. </div><div class="ttdef"><b>Definition:</b> easyBitmap.h:20</div></div>
<div class="ttc" id="class_easy_x_plus_1_1_bitmap_html_a6fc65a423a60bd4357b5c893e68fcbcf"><div class="ttname"><a href="class_easy_x_plus_1_1_bitmap.html#a6fc65a423a60bd4357b5c893e68fcbcf">EasyXPlus::Bitmap::horizontalFlip</a></div><div class="ttdeci">void horizontalFlip()</div><div class="ttdoc">Flip the bitmap horizontally. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
